/**
 * APP配置文件
 */
class AppConfig {
  // 改变环境
  // static final evn = "dev";
  static final evn = "test";
  //static final evn = "prod";

  // 接口前缀
  static final String BASEURL = computed("BASEURL"); // 测试环境

  static String computed(String type) {
    Map fromEnvironment = {};
    switch (evn) {
      case "dev":
        fromEnvironment["BASEURL"] = 'http://dev.daishu-component.com/api/';
        break;
      case "test":
        fromEnvironment["BASEURL"] = 'http://test.daishutijian.com/services_component3/api/';
        break;
      case "prod":
        fromEnvironment["BASEURL"] = 'http://apps.daishutijian.com/daishu_component/public/api/';
        break;
      default:
    }
    return fromEnvironment[type].toString();
  }

}
